.email-recipient-creator {
  display: flex;
  flex-direction: column;
  min-width: 600px;

  @media (max-width: 640px) {
    min-width: auto;
    width: 100%;
  }
}

.panel-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1.5rem 1.25rem 1.5rem;
  border-radius: 10px 10px 0 0;
  border: 1px solid var(--border-color);

  .header-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);

    .header-icon {
      font-size: 1.5rem;
      color: var(--primary-contrast-color);
    }
  }

  .header-text {
    flex: 1;

    .panel-title {
      margin: 0 0 0.25rem 0;
      font-size: 1.25rem;
      font-weight: 600;
      color: var(--text-color);
    }

    .panel-description {
      margin: 0;
      font-size: 0.875rem;
      color: var(--text-secondary-color);
    }
  }

  .close-button {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
  }

  @media (max-width: 480px) {
    padding: 1rem;

    .header-icon-wrapper {
      width: 40px;
      height: 40px;

      .header-icon {
        font-size: 1.25rem;
      }
    }

    .header-text {
      .panel-title {
        font-size: 1.125rem;
      }

      .panel-description {
        font-size: 0.8rem;
      }
    }

    .close-button {
      top: 0.5rem;
      right: 0.5rem;
    }
  }
}

.form-container {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-top: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  max-height: 60vh;
  overflow-y: auto;

  @media (max-width: 480px) {
    padding: 1rem;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;

  &.highlight-group {
    padding: 0.875rem;
  }

  &.checkbox-group {
    padding: 0.75rem 0.875rem;
  }

  @media (max-width: 480px) {
    gap: 0.375rem;

    &.highlight-group {
      padding: 0.625rem;
    }

    &.checkbox-group {
      padding: 0.5rem 0.625rem;
    }
  }
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-color);

  .label-icon {
    color: var(--primary-color);
  }

  .required-indicator {
    color: var(--p-red-500);
    margin-left: 0.125rem;
  }

  @media (max-width: 480px) {
    font-size: 0.875rem;
  }
}

.input-wrapper {
  position: relative;

  .input-full {
    width: 100%;
    padding-right: 2.5rem;
    box-sizing: border-box;
  }

  .input-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    pointer-events: none;

    &.success {
      color: var(--p-green-500);
    }
  }
}

.input-full {
  width: 100%;
  box-sizing: border-box;
}

.field-error {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;

  &::before {
    content: '⚠';
    font-size: 0.875rem;
  }
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;

  .checkbox-label {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    cursor: pointer;
    flex: 1;

    .checkbox-title {
      font-size: 0.9375rem;
      font-weight: 600;
      color: var(--text-color);
    }

    .checkbox-description {
      font-size: 0.8rem;
      color: var(--text-secondary-color);
    }
  }

  @media (max-width: 480px) {
    gap: 0.5rem;

    .checkbox-label {
      .checkbox-title {
        font-size: 0.875rem;
      }

      .checkbox-description {
        font-size: 0.75rem;
      }
    }
  }
}

.gradient-divider {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--border-color) 20%,
    var(--border-color) 80%,
    transparent
  );
  margin: 1.25rem 0;

  @media (max-width: 480px) {
    margin: 1rem 0;
  }
}

.dialog-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);

  .validation-status {
    flex: 1;
    min-width: 0;
  }

  .footer-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
  }

  @media (max-width: 640px) {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0.75rem;

    .validation-status {
      width: 100%;
    }

    .footer-actions {
      width: 100%;
      justify-content: flex-end;
      gap: 0.5rem;
    }
  }
}

.validation-message {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  font-weight: 500;
  border-radius: 6px;
  font-size: 0.875rem;
  width: fit-content;
  max-width: 100%;

  i {
    font-size: 0.95rem;
  }

  &.error {
    background: rgba(239, 68, 68, 0.1);
    color: rgb(239, 68, 68);
    border: 1px solid rgba(239, 68, 68, 0.3);

    i {
      color: rgb(239, 68, 68);
    }
  }

  &.success {
    background: rgba(34, 197, 94, 0.1);
    color: rgb(34, 197, 94);
    border: 1px solid rgba(34, 197, 94, 0.3);

    i {
      color: rgb(34, 197, 94);
    }
  }

  @media (max-width: 640px) {
    font-size: 0.8rem;
    padding: 0.375rem 0.5rem;
    width: 100%;

    i {
      font-size: 0.875rem;
    }
  }
}

